package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.OaSuppliersMapper;
import com.ruoyi.system.domain.OaSuppliers;
import com.ruoyi.system.service.IOaSuppliersService;

/**
 * 供应商Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-11
 */
@Service
public class OaSuppliersServiceImpl implements IOaSuppliersService 
{
    @Autowired
    private OaSuppliersMapper oaSuppliersMapper;

    /**
     * 查询供应商
     * 
     * @param supplierId 供应商主键
     * @return 供应商
     */
    @Override
    public OaSuppliers selectOaSuppliersBySupplierId(Long supplierId)
    {
        return oaSuppliersMapper.selectOaSuppliersBySupplierId(supplierId);
    }

    /**
     * 查询供应商列表
     * 
     * @param oaSuppliers 供应商
     * @return 供应商
     */
    @Override
    public List<OaSuppliers> selectOaSuppliersList(OaSuppliers oaSuppliers)
    {
        return oaSuppliersMapper.selectOaSuppliersList(oaSuppliers);
    }

    /**
     * 新增供应商
     * 
     * @param oaSuppliers 供应商
     * @return 结果
     */
    @Override
    public int insertOaSuppliers(OaSuppliers oaSuppliers)
    {
        return oaSuppliersMapper.insertOaSuppliers(oaSuppliers);
    }

    /**
     * 修改供应商
     * 
     * @param oaSuppliers 供应商
     * @return 结果
     */
    @Override
    public int updateOaSuppliers(OaSuppliers oaSuppliers)
    {
        return oaSuppliersMapper.updateOaSuppliers(oaSuppliers);
    }

    /**
     * 批量删除供应商
     * 
     * @param supplierIds 需要删除的供应商主键
     * @return 结果
     */
    @Override
    public int deleteOaSuppliersBySupplierIds(Long[] supplierIds)
    {
        return oaSuppliersMapper.deleteOaSuppliersBySupplierIds(supplierIds);
    }

    /**
     * 删除供应商信息
     * 
     * @param supplierId 供应商主键
     * @return 结果
     */
    @Override
    public int deleteOaSuppliersBySupplierId(Long supplierId)
    {
        return oaSuppliersMapper.deleteOaSuppliersBySupplierId(supplierId);
    }
}
